From: Erik Naggum Date: Sun, 8 Oct 1995 19:59:42 +0000 (+0000) Subject: (view-exit): Delete view-overlay only if it exists. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~85911 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=641889d6e9884fda13b4c32e27a5ecf785f2f80f;p=emacs.git (view-exit): Delete view-overlay only if it exists. --- diff --git a/lisp/view.el b/lisp/view.el index 6734c05a8a8..5e3069efb46 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -264,7 +264,7 @@ If you viewed an existing buffer, that buffer returns to its previous mode. If you viewed a file that was not present in Emacs, its buffer is killed." (interactive) (setq view-mode nil) - (delete-overlay view-overlay) + (and view-overlay (delete-overlay view-overlay)) (force-mode-line-update) (cond (view-mode-auto-exit (setq buffer-read-only view-old-buffer-read-only)